package com.xxr.mom.ci.charging.dynamic;

/**
 * @author natsuki_kining
 */
public class DataSourceContext {
  public static final ThreadLocal<String> DATASOURCE_CONTEXT = new ThreadLocal<>();

  public static void setCurrent(String dbName) {
    DATASOURCE_CONTEXT.set(dbName);
  }

  public static String getCurrent() {
    return DATASOURCE_CONTEXT.get();
  }

  public static void clear() {
    DATASOURCE_CONTEXT.remove();
  }
}
